# 　读取文件，这个文件可能是不存在的
""""""
try:
    f = open('resource/demo1.txt', 'r', encoding='utf8')
except FileNotFoundError:
    f = open('resource/demo1.txt', 'w', encoding='utf8')
else:
    content = f.read()
    print(content)
finally:
    print('finally执行了')
    f.close()
